/**
 * ourcarlife
 */
package com.whilefor.runner.modules.runner.entity;

import com.whilefor.runner.modules.sys.entity.Office;
import com.whilefor.runner.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.whilefor.runner.modules.sys.entity.Area;

import com.whilefor.runner.common.persistence.DataEntity;

/**
 * 消费者管理Entity
 * @author lins
 * @version 2016-04
 */
public class RunnerConsumer extends DataEntity<RunnerConsumer> {
	
	private static final long serialVersionUID = 1L;
	private Office office;		// 归属部门
	private User user;		// 账号
	private String consumerName;		// 名称
	private Date consumerBirth;		// 生日
	private String consumerSex;		// 性别
	private String consumerPhone;		// 联系电话
	private Area consumerArea;		// 注册地址
	private String consumerAddress1;		// 地址1
	private String consumerAddress2;		// 地址2
	private String consumerAddress3;		// 地址3
	private String info;		// 简介
	private String mac;		// mac绑定
	
	public RunnerConsumer() {
		super();
	}

	public RunnerConsumer(String id){
		super(id);
	}

	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=100, message="名称长度必须介于 0 和 100 之间")
	public String getConsumerName() {
		return consumerName;
	}

	public void setConsumerName(String consumerName) {
		this.consumerName = consumerName;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getConsumerBirth() {
		return consumerBirth;
	}

	public void setConsumerBirth(Date consumerBirth) {
		this.consumerBirth = consumerBirth;
	}
	
	@Length(min=0, max=6, message="性别长度必须介于 0 和 6 之间")
	public String getConsumerSex() {
		return consumerSex;
	}

	public void setConsumerSex(String consumerSex) {
		this.consumerSex = consumerSex;
	}
	
	@Length(min=0, max=20, message="联系电话长度必须介于 0 和 20 之间")
	public String getConsumerPhone() {
		return consumerPhone;
	}

	public void setConsumerPhone(String consumerPhone) {
		this.consumerPhone = consumerPhone;
	}
	
	public Area getConsumerArea() {
		return consumerArea;
	}

	public void setConsumerArea(Area consumerArea) {
		this.consumerArea = consumerArea;
	}
	
	@Length(min=0, max=3000, message="地址1长度必须介于 0 和 3000 之间")
	public String getConsumerAddress1() {
		return consumerAddress1;
	}

	public void setConsumerAddress1(String consumerAddress1) {
		this.consumerAddress1 = consumerAddress1;
	}
	
	@Length(min=0, max=3000, message="地址2长度必须介于 0 和 3000 之间")
	public String getConsumerAddress2() {
		return consumerAddress2;
	}

	public void setConsumerAddress2(String consumerAddress2) {
		this.consumerAddress2 = consumerAddress2;
	}
	
	@Length(min=0, max=3000, message="地址3长度必须介于 0 和 3000 之间")
	public String getConsumerAddress3() {
		return consumerAddress3;
	}

	public void setConsumerAddress3(String consumerAddress3) {
		this.consumerAddress3 = consumerAddress3;
	}
	
	@Length(min=0, max=4000, message="简介长度必须介于 0 和 4000 之间")
	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}
	
	@Length(min=0, max=255, message="mac绑定长度必须介于 0 和 255 之间")
	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}
	
}